A sensitive high repetition rate arrival time monitor for X-ray free electron lasers

X-ray free-electron laser sources enable time-resolved X-ray studies with unmatched temporal resolution. To fully exploit ultrashort X-ray pulses, timing tools are essential. However, new high repetition rate X-ray facilities present challenges for currently used timing tool schemes. Here we address this issue by demonstrating a sensitive timing tool scheme to enhance experimental time resolution in pump-probe experiments at very high pulse repetition rates. Our method employs a self-referenced detection scheme using a time-sheared chirped optical pulse traversing an X-ray stimulated diamond plate. By formulating an effective medium theory, we confirm subtle refractive index changes, induced by sub-milli-Joule intense X-ray pulses, that are measured in our experiment. The system utilizes a Common-Path-Interferometer to detect X-ray-induced phase shifts of the optical probe pulse transmitted through the diamond sample. Owing to the thermal stability of diamond, our approach is well-suited for MHz pulse repetition rates in superconducting linear accelerator-based free-electron lasers.

X-ray free-electron laser sources enable time-resolved X-ray studies with unmatched temporal resolution. To fully exploit ultrashort X-ray pulses, timing tools are essential. However, new high repetition rate X-ray facilities present challenges for currently used timing tool schemes. Here we address this issue by demonstrating a sensitive timing tool scheme to enhance experimental time resolution in pump-probe experiments at very high pulse repetition rates. Our method employs a self-referenced detection scheme using a time-sheared chirped optical pulse traversing an X-ray stimulated diamond plate. By formulating an effective medium theory, we confirm subtle refractive index changes, induced by sub-milli-Joule intense X-ray pulses, that are measured in our experiment. The system utilizes a Common-Path-Interferometer to detect X-ray-induced phase shifts of the optical probe pulse transmitted through the diamond sample. Owing to the thermal stability of diamond, our approach is well-suited for MHz pulse repetition rates in superconducting linear accelerator-based free-electron lasers.
In the last decade, the advent of intense femtosecond (fs) X-ray Free Electron Lasers (XFELs) launched the need for accurate control of the timing between two independent light sources: a free electron laser starts off with the photoinjector gun on the order of one kilometer away from the experiment, and a femtosecond optical laser source, typically located in the vicinity of a few tens of meters around the experiment. For femtosecond pump-probe X-ray experiments it is required to have accurate control of the timing. A precise synchronization scheme between both independent light sources is required for sub 100 fs timing jitter between both sources. To further increase the time resolution, the relative arrival time of the X-ray and optical laser pulses are measured close to the experiment with an appropriate diagnostic. Over the past decade, two main techniques have matured for reliable use with hard X-ray photon energies at different XFEL facilities, known by their brief names spectral 1-3 and spatial 4-6 encoding schemes. These schemes have been established at low repetition rate XFEL sources. At high repetition rate machines, such as European XFEL (EuXFEL) 7,8 , the MHz pulse sequence requires sample relaxation time scales well below a few hundred nanoseconds, and only one study attempted to enter this range 9 . In addition, the deposited energy by a fully filled X-ray pulse-train heats up the sample, potentially destroying conventional timing-tool samples such as silicon nitride (Si 3 N 4 ) or yttrium aluminium garnet (YAG) within a single pulse-train (Supplementary Note 1). This fact requires new timingtool schemes with interaction samples able to withstand the sequence of intense X-ray pulses at MHz repetition rates. Diamond is a prime candidate as interaction sample, but can not be used in conventional spectral or spatial encoding schemes due to very weak X-ray-induced optical absorption or transmission changes 3 .
In this work we describe a self-referenced timing tool scheme with an increased sensitivity. This scheme could be applied at all X-ray wavelengths from soft (< 1 keV) to very hard (> 25 keV) X-ray energies. The self-referenced scheme is not only sensitive to the change of amplitude of the transmitted optical probe pulse of the timing tool, but is also sensitive to the altered phase of the optical pulse. This increased sensitivity is achieved by time-shearing the optical pulse in a Common-Path-Interferometer (CPI). The optical pump-probe laser can be synchronised to the X-ray pulses by using two different synchronisation schemes: The precise and state-of-the-art optical synchronization (OS) 10,11 and the more versatile but less precise radiofrequency based synchronisation (RFS) 12 . We measure the timing jitter at the Femtosecond X-ray Experiments Instrument (FXE) 13,14 of EuXFEL, using both available synchronisation schemes. In addition, we can extract the X-ray-induced refractive index change with this timing tool method, to which the signal amplitude is directly correlated. While the Drude model is commonly used to describe the X-ray-induced optical changes in the sample 1, 6 , we use the more advanced Maxwell-Garnett theory 15 , an effective medium approximation for dielectric mixtures, to calculate the X-ray-induced refractive index change, and we show that this approach provides a more precise description than the commonly used Drude model.

Experimental setup
The experiment was carried out at the FXE instrument at the end of the SASE1 photon beamline of EuXFEL at a fixed X-ray photon energy of 9.3 keV and a mean X-ray pulse energy of 300 μJ. The pulse width is expected to be around 50 fs at full width at half maximum (FWHM) 8 . EuXFEL uses a superconducting linear accelerator, enabling the unique feature to produce trains of up to 2700 electron bunches within one 600 μs long radiofrequency (RF) pulse 8 . With a 10 Hz RF pulse train repetition rate, EuXFEL is capable of generating X-ray pulses in a pulsetrain pattern with an intra-train repetition rate of up to 4.5 MHz, which, together with the inter-train repetition rate of 10 Hz yields a total of up to 27.000 X-ray pulses per second. We used a train filling pattern at 1.128 MHz repetition rate and 100 X-ray pulses stored in each pulse train. The X-ray pulses were pre-collimated in the photon tunnel using compound refractive lenses (CRLs) to match the aperture of downstream optics. Another stack of CRLs, located about 5 m upstream from the sample was used to achieve a nominal spot size of 150 ± 10 μm at the sample position 13,14 , which matches the same expected size under conditions yielding a pre-focus inside the photon transport tunnel. The in-house developed EuXFEL optical pump-probe laser system was utilised, which is synchronised to the facility's main oscillator, and matches any chosen X-ray pulse pattern of the facility 16 . It delivers 15 fs (rms) ultrashort pulses at its 800 nm central wavelength. The 800 nm fundamental optical beam was frequency doubled with a βBBO (d = 0.5 mm θ = 29.2°and ϕ = 90°) crystal to generate optical pulses centered around 400 nm with a FWHM bandwidth of around 20 nm with a conversion efficiency of around 15%. The entire setup of the self-referenced timing tool was mounted on the multi-axis samplestack, enabling the movement of the entire setup with all required degrees of freedom 13,14 .
The concept is based on an X-ray and optical cross-correlation scheme, using a frequency-to-time mapping to imprint the relative X-ray arrival time in a chirped optical pulse 1,3 . The setup is based on a CPI, which creates a self-referenced background-free measurement (see Methods). An arrival time signal will only be measured in the presence of an X-ray pulse, otherwise, a zero-signal will be obtained. Our setup uses interferometric sensitivity to measure the phase-(and amplitude) change of a transmitted optical pulse after passing through a sample whose refractive index is changed by the partial absorption of a simultaneously transmitted X-ray pulse.
A schematic of the setup is shown in Fig. 1. The optical laser pulses are guided over a motorised optical delay stage Δt 1 , which is used for temporal fine adjustment between the optical and X-ray pulses. The 800 nm pulses are then frequency doubled via second harmonic generation (SHG). For the relative arrival time measurement, a timing window of about 1 ps is needed to reliably cover the entire range of the temporal jitter between optical and X-ray pulses. We achieve this by chirping the optical pulses to the length of the desired timing window by transmitting the 400 nm pulse through a dispersive optical element (flint glass SF11) Disp., whose thickness is chosen to match the desired amount of chirped pulse length. The dispersive element orders the optical frequencies in time yielding smaller frequencies (or wavelengths on the red side) in front and higher frequencies (or wavelengths on the blue side) on the trailing side of the pulse.
The chirped pulses enter the main part of the timing tool, the CPI, consisting of two polarisers P 1 and P 2 before and after the sample and two 5mm thick a-cut αBBO 1,2 crystals. The interaction sample S, where the X-ray and optical pulse pairs are temporally and spatially overlapped, is placed in the center of the CPI. The sample is used to imprint the X-ray arrival time by an X-ray-induced refractive index change into the simultaneously transmitted optical pulse. Two lenses are used to Fig. 1 | Self-referenced timing tool setup. An ultrashort 800 nm optical pulse is guided through a motorised delay stage Δt 1 and frequency doubled to 400 nm in a second harmonic generation (SHG) crystal. A dispersive flint glass block (Disp.) is used to further chirp the optical pulse duration. The chirped pulse is guided through the Common-Path-Interferometer (CPI) consisting of two polarisers P 1,2 and two a-cut αBBO 1,2 crystals. The optical pulse and the X-ray pulse (XFEL) are temporally and spatially overlapped in the diamond sample S in the center of the CPI, where the X-ray arrival time is imprinted into the optical pulse. The spectrally encoded arrival time is analyzed with a spectrograph (Sp). The optical laser and XFEL sources are either synchronised with a radiofrequency based sychronisation (RF sync.) or an optical synchronsiation scheme (opt. sync.). The X-ray beam is focused by using a compound refractive lense stack (CRLs). focus the optical pulses onto the sample (40 μm FWHM) and to collimate the optical beam exiting the sample. The optical pulses were then guided to a spectrograph SP (Andor Shamrock 193i with a 600 l/mm grating) to evaluate the self-referenced X-ray arrival time signal. Various neutral density filters (Thorlabs ND Filter with AR coating) were placed in front of the entrance slit to protect the detector from optical saturation. When not stated otherwise, the standard configuration during this experiment used a 1.5 OD filter (Thorlabs NE15A-A) in front of the spectrometer. For the detection of the individual spectra, we used a Gotthard detector 17 in the focal plane of the spectrograph, synchronised to the optical source and operated at 564 kHz, thus, recording every second optical pulse within the pulse trains. In the near future, new strip detectors such as the Gotthard-II 18 and the KALYPSO 19 detectors can capture every single pulse of a full pulse train at 4.5 MHz repetition rate. Another possibility is to use a second Gotthard detector attached to a second output of the Andor spectrograph, such that these two Gotthard detectors can be operated to record the arrival time spectra for every pulse at 1.1 MHz in an alternating fashion. Fused-silica glass blocks with a thickness of 0.4 cm or 2.5 cm were added to the 400 nm optical beam path to chirp the optical pulses to further increase the temporal measurement window.

X-ray-induced transient refractive index
The fundamental effect, which alters the refractive index upon impinging X-ray pulses, is the absorption of X-ray photons and subsequent generation of charge carriers in the sample material, which effectively increase the charge carrier density. The created charges change the band structure of the material, and, thus, affect the refractive index. To get an idea of the magnitude of the transient refractive index change, the X-ray-induced electron density after an X-ray pulse needs to be estimated.
An absorbed X-ray photon excites a core shell electron and ejects it from the atom, leaving a hole behind. On the fast time scales, the hole decays within femtoseconds via an Auger decay, while fluorescent decay processes happen on much longer time scales 20 . The fast Auger decay initiates an electron cascade through inelastic electron-electron collisions. This cascade will last until the cascading electrons reach an energy below their pair creation energy 21,22 . The time scale of the full electron cascade after an initial X-ray photon absorption depends on the X-ray photon energy. In general the electron cascade for low energetic X-ray photons is shorter (< 20 fs) due to lesser cascading steps needed, until the electron energy reaches the pair creation energy of 12.2 eV in diamond. For high-energy photons (> 10 keV), the cascading can reach time scales of 100 femtoseconds 23 . The so generated electrons in the conduction band have a long lifetime in the 1-3 ns range 24 .
Simulated electron densities N e for three different X-ray beam diameters in a 50 μm diamond sample are shown in Fig. 2a-c. Further information of the calculation can be found in the Methods section. The simulation illustrates the expected charge carrier densities (cm −3 ) for a broad range of X-ray pulse energies (y-axis) over an X-ray photon energy range from 5 keV to 25 kev and three different X-ray FWHM beam diameters of 20 μm, 100 μm and 200 μm. From the previous section, it can be deduced that X-ray pulses generating an electron density above 1 × 10 21 electrons cm −3 are increasing the diamond temperature above its melting point. Therefore, these electron densities are ruled out in Fig. 2a.
Drude model. The optical properties of solids are closely related to the electronic properties of a material. The dielectric function ϵ(ω) is influenced by free carriers. These free carriers are often responsible for ultrafast electrical changes in materials after irradiation with ultrashort optical or X-ray pulses 25 . A simple model to estimate the contribution of free electrons is a model based on classical conductivity, called the Drude model. This plasma model is based on a gas of free electrons. In this approach, details of the lattice potential and electron-electron interactions are not included. This simple model is frequently used to estimate the expected X-ray-induced refractive index changes in various materials 1,6 . The electric properties of a solid material are closely related to the real and imaginary parts of the dielectric function ϵ(ω) = ϵ 1 (ω) + iϵ 2 (ω). The dielectric function is dominated by the free electron density N e . In the Drude model, the dielectric function is described in ref. 25, 26 where ϵ r is the intrinsic dielectric constant, ω p = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi N e e 2 =ϵ 0 m ? e p the plasma frequency, ω o the central angular frequency of the optical laser and τ the mean free electron time between collisions. Here, ϵ 0 is the vacuum permittivity and m ? e is the effective electron mass. The complex refractive index is defined as n(ω) 2 = ϵ(ω), thus the real and imaginary part of the refractive index can be calculated from the Drude model (see Methods).
Maxwell-Garnett theory. The change of the number of electrons in the conduction band alters the dielectric properties of diamond. The Drude model in Eq. (1) treats the free charge carriers as exponentially damped harmonic oscillators with a characteristic plasma frequency ω p and damping being related to the mean free time between electron collisions 27 . A possible extension to this simple independent-particle model is to include the coupling of the induced free charge carriers with their dielectric background. The free electrons created by the incoming X-ray pulses interact instantaneously (i.e. within 0.3 fs) 28 with the bound electrons in the diamond crystal, distort their equilibrium distribution and thus polarise the diamond lattice. This self-induced electronic polarisation cloud screens the free charges, moves with them along the crystal and the electrons plus the distortion of the bound charges in the lattice form together an electronic polaron [29][30][31] . The dielectric properties of this quasiparticle differ slightly from those of the bare diamond lattice. We may then describe the diamond crystal in the presence of the polarons as a mixture of two different but isotropic dielectrics. The Maxwell-Garnett theory describes such dielectric mixtures with an effective combined dielectric function 32 where ϵ d (ω) and ϵ p (ω) are the dielectric functions of the bare diamond crystal and that created by the polaron, respectively. The volume fraction of the polarons l = 4πN e r 3 p =3 depends on their radius r p and the free charge carrier density N e . We use a Debye-type dielectric x) with the respective high-(ϵ ∞,x ) and low-(ϵ S,x ) frequency dielectric constant and a specific Debye We assume a slight reduction of the high-frequency and static dielectric constant for the polarons in comparison with the bulk dielectrics of the diamond. The change of the dielectric properties of diamond due to polaron formation is in line with the results from time-dependent density functional theory calculations of diamond at an energetically excited state 33 . The decrease of the dielectric parameters can be understood in terms of the reduced overall electronic polarisability of the electrons in the polarons because the free electrons interact with the increased localised charge distribution in the form of the polarization cloud in the lattice. This causes more rigid charges and thus a smaller polarisability. Also, the reduced polarisability causes an increased Debye relaxation time τ D,p of the polaron. Eq. (2) is the result of the Maxwell-Garnett model which considers the electronic polarons as an ensemble of homogeneous dielectric spherical particles of radius r p ≤a comparable or less than the interatomic spacing a of the lattice (see Tab. S2 in the Supplementary Note 5 for the described model) 31 .
Self-referenced signal simulation. Using the dielectric properties for diamond (Tab. S1, S2, and S3 in the Supplementary Note 5) and the two models described above, we have simulated the expected X-rayinduced transient refractive index change in diamond. The estimated refractive index change for X-ray photon energies ranging from 5 keV to 25 keV and X-ray pulse energies ranging from 1 μJ to 2 mJ calculated with the Drude-and Maxwell-Garnett model are shown in Fig. 3a-c and d-f, respectively. The X-ray beam profile is assumed to be a flat-top beam profile with beam diameters of d = 20 μm (a) and d)), d = 100 μm (b) and e)) and d = 200 μm (c) and f)). A beam size of d = 20 μm would represent a timingtool operated very close to the X-ray focus, while the other two beam diameters of d = 100 μm and d = 200 μm are more relaxed conditions far away from the focal plane. The white parts in Fig. 3a and d are due to X-ray conditions, where the absorbed X-ray photons would heat the diamond above its melting point and are therefore omitted.
The expected timing signal caused by the transient refractive index change described by the Drude-and Maxwell-Garnett theory can be estimated by linear propagation of an arbitrary shaped laser pulse through the involved optical elements (Supplementary Note 2). The signal strength of the self-referenced timing tool in diamond is directly correlated to the X-ray-induced refractive index change in the diamond sample. Since the optical light of the timing tool probe pulse does not exhibit any significant X-ray-induced absorption or reflection, the timing tool signal amplitude is solely caused by the X-ray-induced optical phase shift after the X-ray pulse striked the sample. The phase shift is defined by where Δn is the transient refractive index change and λ 0 the central wavelength of the optical laser pulse. Depending on the relative arrival time of the ultrashort X-ray pulse and the longer time-sheared optical pulse, the X-ray-induced phase-shift is imprinted at different wavelengths in the optical pulse. A simulation of the self-referenced timing tool signal for various different relative arrival times and using actual experimental conditions is shown in Fig. 4.

Arrival time measurements at the FXE instrument
A pixel (thus wavelength) to time calibration is required to map the recorded self-referenced arrival time spectra onto a time axis, enabling the evaluation of the relative X-ray arrival time. For this purpose the optical delay stage was scanned, while using the more precise optical synchronisation scheme (OS) of the facility. For each time delay step thousands of arrival time spectra were recorded. With the known step size of the motorised delay stage, a linear calibration factor of 28 ± 5 fs/ pixel was extracted (Supplementary Note 3).
To analyze individual arrival times, the edge positions of the individual arrival time spectra are determined by fitting the recorded spectra with an error-function-like fitting function. This procedure is exemplarily shown in the Supplementary Information (Fig. S5 and S6). The fit results with the time calibration yield an overall timing accuracy of 19 fs in this experiment. This precision is governed by the utilised spectrometer resolution and can be increased by using a more dispersive, e.g., by about a factor of two when using a 1200 l/mm.
During the experiment, the X-ray beam pointing was not stable due to subtle mechanical vibrations on the mirror system (comprising three mirrors) in the photon delivery tunnel, located several hundreds of meters upstream from the sample position 34 . This leads to a fluctuating spatial overlap between the X-ray and optical pulses in the   diamond sample affecting the signal quality. To reject spectra with bad spatial overlap between the two pulses, all self-referenced arrival time spectra with a signal-to-noise ratio below 2 were removed from the analysis. Analysis of the X-ray pointing jitter and the rejection of weak arrival time spectral intensities are given in reference 35 .
The time arrival measurements were performed with both available facility synchronisation schemes, for which we determined the relative X-ray arrival time jitter (Fig. 5). Panels (a) (with the RFS scheme) and (b) (with the OS scheme) show the relative arrival times of every (second) individual X-ray pulse for six consecutive pulse trains. In this sequence we had x-ray pulse energies ranging from low to the highest value, which delivered an arrival time spectrum with S/N > 2. Figure 5c, d display the arrival time distribution for all available X-ray pulse arrival times within a 100 s time window. As expected, the RF-synchronisation shows a wider spread of the X-ray arrival=times, with 154 ± 19 fs FWHM (c) compared to the optical synchronisation with an arrival time distribution of 83 ± 19 fs FWHM. One should note that over a longer time periods, the RF-synchronisation timing jitter is expected to become worse, while the optical synchronisation timing jitter is expected to remain within the 83 fs FWHM window 9 .
Interestingly, the pulse pattern in Fig. 5 between RFsynchronisation (a) and optical synchronisation (b) shows a different behavior for the relative arrival times within a single pulse train. As a guide to the eye, a linear function is fitted into each pulse train, indicating the trend of the drifting arrival times. Using the RF-synchronisation, the relative arrival times within a train generally drift to earlier arrival times, while for the OS scheme there is no clear trend observed within the pulse train.
Looking more closely into the intra-train drift pattern (Fig. 6) the linear decrease for the RFS synchronisation is displayed together with the nearly flat results using the OS scheme (central panel) for several thousand pulses (the first pulse of the pulse trains is set to 0 fs). The shaded area in Fig. 6 indicates the extracted standard deviation of the arrival times for each pulse number within a pulse train. Notably, the relative arrival times of the first 10 pulses within a pulse train are more uncertain (larger standard deviation) than the following X-ray pulses for either synchronisation scheme. The relative arrival time distribution for all measured pulse trains are shown on the left and right panels of Fig. 6 for RFS and OS schemes, respectively.
The FWHM of both distributions are very similar with 22 fs (OS) and 24 fs (RFS). Since both intra-train arrival time distributions are nearly identical, it suggests that the optical synchronisation mainly stabilises the 10 Hz pulse-train to pulse-train timing jitter.

X-ray-induced refractive index change
With the self-referenced timing tool we can directly probe the X-rayinduced transient refractive index change. To get an estimate of the Xray-induced transient refractive index change, we simulate the selfreferenced signal as described before with the actual experimental conditions and compare the simulation to the actual experiment. The X-ray-induced phase change, related to the transient refractive index via Eq. (3), is a free fitting parameter, which we use to scale the simulated signal amplitude to match the experimentally measured arrival time signal.
In order to perform the simulation, the full spectrum of the original laser pulse needs to be known. The total laser spectrum is measured by rotating the second polariser P 2 , to fully transmit the original 45°polarised optical pulse. To protect the detector from oversaturation, a neutral density filter (Thorlabs NE20A-A) was placed in front of the spectrometer, transmitting 0.05% of the pulse at a central wavelength of 410 nm. In this configuration we recorded 1000 individual laser pulses and averaged all of them to obtain the spectrum of the laser pulse. This averaged spectrum will be used to reconstruct the electric field of the laser pulse for the simulation.
As described above and in more detail in the Supplementary Information (Supplementary Note 2), the obtained laser pulse from the actual experiment is linearly propagated through the setup. The goal of the simulation is to recreate the experimentally measured selfreferenced arrival time spectra, using the known experimental conditions, where the only free parameter is the transient refractive index change. By using the transient refractive index as a fitting variable in the simulation, the amplitude of the simulated signal can be scaled to the measured arrival time signal. With this method we can deduce the magnitude of the X-ray-induced transient refractive index change in the measurement.
Due to the inevitable X-ray pointing instability, the arrival time spectra are subject to huge amplitude variations. This happens when the X-ray and optical pulses are not perfectly overlapped. Since the optical pulse focus size was set to be smaller than the X-ray focus size, we are only interested in the measurements with the highest selfreferenced signal amplitudes. This ensures a perfect overlap between both pulses, where the optical pulse probed the maximal refractive index change in the center of the X-ray pulse footprint on the diamond sample. We use the highest 0.5% (1600 measurements) of the selfreferenced spectra amplitudes to ensure that i) the X-ray pump and laser probe pulses fully overlap, and ii) a well-known (highest) X-ray pulse energy (here: 0.68 mJ) strike the sample. As described in the experimental details section, the X-ray pulse energy at 9.3 keV was measured with an average pulse energy of 300 μJ. With the pulse resolved Intensity Position Monitor (IPM) 13 , the average X-ray energy of the top 0.5% analysed data is determined with 640 μJ. Using the selected spectra, we analyze the X-ray-induced refractive index change, see Fig. 7. The selected self-referenced arrival time spectra are averaged and a simulated arrival time spectrum is fitted to match the experimental data. The X-ray-induced refractive index change to fit the experimental data is Δn exp = À 5:7 × 10 À5 .
To calculate the expected X-ray-induced refractive index change with the Drude and Maxwell-Garnett models, the exact electron density generated by the X-ray-induced electron cascade needs to be known. Using the actual X-ray beam size at the sample position of 150 ± 10 × 30 ± 2 μm and an X-ray pulse energy of 640 μJ, the transient refractive index in the diamond sample can be calculated as a function of the X-ray beam profile. The calculated results are shown in Fig. 8. The fluence dependent X-ray beam profile is depicted in subfigure a) with a maximum fluence in the center of the beam of 12 J cm −2 . The calculated transient refractive index change in the 50 μm thick diamond sample is shown in subfigure b) for the Drude model and c) for the Maxwell-Garnett theory.
With the known conditions of the focal X-ray beamsize and X-ray pulse energy, the transient refractive index change in the center of the beam profile is calculated to be Δn D =À2:9 + 0:1 À0:08 × 10 À3 and Δn MG =À6:3 + 0:29 À0:26 × 10 À5 with the Drude and Maxwell-Garnett theory, respectively.
These calculated X-ray-induced refractive index changes are used to simulate the self-referenced arrival time signal and are compared to the simulation which reproduces the experimental data in Fig. 7. The widely used Drude model (purple) heavily overestimates the X-rayinduced refractive index change when compared with the experimental (blue) data, see Fig. 9. The simulated arrival time spectrum with the Maxwell-Garnett model (orange) and the experimentally measured arrival time signal are matching within the error bars (orange shaded area) of the simulation. The error bars of the simulation are due to the uncertainty of the X-ray focus size and the corresponding X-rayinduced electron density in the diamond sample.
With an experimentally determined X-ray-induced refractive index change of − 5.7 × 10 −5 , the phase shift corresponds to 2.57°. The theoretically predicted phase shifts are 2.66°(Maxwell-Garnett) and 126°(Drude). The large predicted X-ray-induced phase shift by the Drude model would be clearly visible in the arrival time spectra as selfphase modulation like oscillations. Phase shifts larger than one cycle of the optical wavelength cause severe oscillations in the optical arrival time spectrum (Fig. S4 in the Supplementary Information). The nonexisting observation of these oscillations in the measured optical arrival time spectra support our finding of a very small X-ray-induced refractive index change on only a few degrees and contradicts the larger phase shift predicted by the Drude model.

Discussion
We have introduced a self-referenced detection scheme to measure the relative X-ray arrival time of hard X-ray pulses at XFEL facilities at MHz repetition rates. A major step towards future timing-tools is accomplished by developing a timing tool allowing the usage of diamond as interaction sample. With this we pave the way for timing tools which are nearly non-invasive compared to the other commonly used spectral and spatial encoding timing tool, due to the very low X-ray absorption cross-section of diamond in the hard X-ray regime. For future MHz repetition rate XFELs diamond might be the only material which is able to withstand the operation with intense X-ray pulses. In addition, the presented method possesses some advantages over other commonly used timing tool schemes. It is easier to set up and operate than a THz-Streaking experiment 36 and it is more sensitive and less invasive than the established spatial-and spectral encoding schemes.
The X-ray arrival time jitter at the FXE instrument of EuXFEL was measured using a 50 μm thick diamond sample as interaction sample with the self-referenced detection scheme. Both facility synchronisation schemes were used and relative arrival time jitter of 154 fs FWHM and 83 fs FWHM were measured using the RFS and OS, respectively. The intra-train timing jitter is almost identical for both synchronisation Fig. 7 | Experimentally determined and simulated arrival time spectra. Selfreferenced arrival time spectra with the 0.5% highest amplitudes (orange). The average (red) of theses arrival time spectra is used as reference to fit a simulated (blue) arrival time spectrum to the data. The required X-ray-induced refractive index change to fit the simulation is Δn exp = À 5:7 × 10 À5 . The horizontal shifts of the individual arrival time spectra are caused by the arrival time jitter, while the fluctuating amplitudes are caused by the X-ray pointing instabilities. By comparing the experimentally measured arrival time spectra to a simulated arrival time spectrum, we were able to estimate the X-rayinduced refractive index. For X-ray photon energies of 9.3 keV and a peak fluence of 12 J/cm 2 in the center of the X-ray beam profile, the X-ray-induced refractive index change was Δn exp = À 5:7 × 10 À5 . We showed that the commonly used Drude model overestimates the X-ray-induced refractive index change by nearly two orders of magnitude. We have demonstrated that the Maxwell-Garnett theory of dielectric mixtures, where we assume a dielectric mixture of a diamond host material and electronic polarons, describe the observed measurement very well. With the high versatility of this self-referenced timing tool, even in-situ arrival time measurements in a unstable freeflowing liquid jet are possible 37 . This can also be used to quantify the robustness of the Maxwell-Garnett model for various materials and liquids in the near future.

Common path interferometer (CPI)
The self-referenced detection scheme relies on the inherent stability and robustness of the CPI. The first idea for a CPI occurred in 1958, described by L. Mertz 38 and was applied a few years later to realise a Polarisation Fourier Spectrometer for astronomical measurements 39 . The advantage of this interferometer scheme is that the generated pulse-replica co-propagate through the setup, making it robust against environmental disturbances, e.g., mechanical vibrations or air flows. Any occurring disturbance affects both pulse-replica equally, thus, effectively cancelling out the distortion. The CPI setup built for this experiment is illustrated in Fig. 10. The main parts are two identical a-cut birefrigent crystals (BC) between two crossed polarisers. The transmission axis of the first polariser is set to 45°, such that behind the first polariser, the transmitted light has a defined linear polarisation of 45°(1). The 45°polarised pulse can equally be described as a linear combination of a horizontal (blue) and vertical (orange) polarisation components (PC) with equal amplitudes.
The first BC is aligned with its optical axis to be horizontal. Due to the birefringence of the crystal, the horizontal PC experiences the extraordinary refractive index n e , while the vertical PC experiences the ordinary refractive index n o of the crystal. After passing the first BC, the two PCs are then time-delayed with respect to each other (2). The time-delay between the two PCs is defined by the ordinary n o and extraordinary n e refractive index and the crystal thickness.
The two PCs are transmitted through the (ideally) optically isotropic sample, experiencing the same refractive index. The second BC is rotated orthogonally to the first BC, such that the optical axis is now perpendicular to the optical axis of the first BC. The PC arriving first, which experienced the extraordinary refractive index n e in the first BC, now experiences the ordinary refractive index n o of the second BC, and vice versa for the trailing PC. In such a configuration, both PCs are temporally overlapped again behind the second BC. After the second BC, both PCs are effectively propagated through two crystals with identical thickness and accumulated the same amount of additional phase by experiencing the same effective refractive index. Both PCs are then exactly synchronised. The linear combination of both PCs recreates the original 45°linear polarised optical pulse (3).
This 45°polarised optical pulse is then completely blocked by the second polariser, whose transmission axis is oriented to be −45°. In this case, no optical pulse can be observed behind the second polariser (4).
If the amplitude or phase of one of the two PCs is artificially manipulated, the situation is different: In this case, the ultrashort X-ray pulse is temporally overlapped with the trailing vertical PC as shown in (5). The entire leading horizontal PC and half of the trailing vertical PC is transmitted through the sample before the X-ray pulse (green) strikes the sample. The X-ray pulse generates an electron cascade, modulating the electronic band structure, ultimately changing the complex refractive index of the sample. Due to this change of the refractive index, parts of the vertical PC, arriving after the X-ray pulse, pass through the sample with the modulated refractive index. These are then subject to a phase-shift of the transmitted optical light (6). Due to the chirp of the original optical pulse, the temporally leading red spectral parts of both PCs transmit through the sample without the modulated refractive index. The trailing spectrally blue parts of the leading horizontal PC also pass through the sample with the static refractive index, while the identical blue parts of the trailing horizontal PC passes through the sample with its X-ray-modulated refractive index and are phase-shifted by a small amount. The first polariser defines the polarisation of the optical pulse to 45°, which can equally be described by two perpendicular polarisation components (PCs, 1). No phase-shift is introduced in the absence of any X-ray pulse and the two time-delayed PCs (2), generated by the first birefringent crystal (BC), can be perfectly synchronised behind the second BC. This recreates an 45°polarised pulse (3), blocked by the second polariser (4). In the presence of an X-ray pulse (5), a phase-shift is introduced (6), preventing the perfect synchronisation of both PCs behind the second BC and creating an elliptical polarised pulse (7), partly transmitted through the second polariser (8).
Behind the second BC, the original 45°polarisation can not be recreated by a linear combination of both synchronised PCs. The temporally leading lower wavelength parts of both PCs are still perfectly synchronised and recreate the original 45°polarisation, and are therefore blocked by the second polariser. However, the higher wavelength parts are not synchronised anymore due to the X-ray-induced phase-shift of these spectral parts in the trailing horizontal PC. The linear combination of these parts now yield an elliptically polarised optical pulse (7).
The perfectly synchronised first part of the optical pulse with the red spectral parts is still 45°polarised and still not transmitted by the second polariser. The elliptical polarised blue parts of the optical pulse can partially transmit through the second polariser, generating a self-referenced background-free arrival time signal (8). Depending on the relative arrival time between the optical and X-ray pulse, the spectral position of the transition between the original 45°polarisation to the elliptical polarisation changes for each optical / X-ray pulse pair and is clearly visible in the observed spectrum by a cut-off edge.

X-ray-induced refractive index change
The electron-hole pair density after an X-ray pulse with known X-ray photon energy in a material with X-ray attenuation length μ, can be calculated using E abs is the total absorbed energy in a material with thickness d of the incoming X-ray pulse with total energy E 0 . The electron density N is then calculated by dividing E abs by the X-ray irradiated volume V and the electron-hole pair generation energy E pair which is 12.2 eV in diamond. In our experiment (9200 eV, 200 μJ, 20 μm X-ray size, 50 μm thick diamond), the peak X-ray-induced electron density N in the center of the Gaussian beam profile is calculated to be 4.7 × 10 19 electron-hole pairs cm −3 . The diamond properties used for the Drude and Maxwell-Garnett models are listed in Tables S1 and S2 (Supplementary Note 5), respectively. The X-ray induced refractive index change is determined by where n B (ω) and n A (ω) are the real part of the refractive indices before (B) and after (A) the X-ray interaction with the diamond. Note that we use literature values of diamond for n B (ω) (see Table S3 in Supplementary Note 5). The real part of the refractive index after the X-ray interaction is calculated by n A ðωÞ = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi with the complex dielectric function ϵ(ω) for a given light frequency ω.

Linear propagation and expected self-referenced signal
The self-referenced arrival time signal is simulated by linear propagation of the original chirped laser pulse (centered around 400 nm) through each element of the CPI. The X-ray induced change of the electron density N in the diamond sample is imprinted into the transmitted optical pulse by a change of the refractive index of the diamond sample over a time span of tens of fs, depending on the electron cascading time 22,23 . The linear propagation is described in detail in Supplementary Note 2. The properties used for the simulation are compiled in Tab. S3 (Supplementary Note 5).

Data availability
The data that support the findings of this study are available from the corresponding author(s) upon request.

Code availability
The code for the simulation of the self-referenced arrival time spectra is available from the corresponding author(s) upon request.